<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Upload a new file</title>
	<f:metadata>
		  <f:viewParam name="init" value="#{sendBean.viewParameterInit}"/>
		  <f:event listener="#{sendBean.initDynamicView}" type="preRenderView" />
	</f:metadata>
</h:head>
<h:body>

	<h:form enctype="multipart/form-data" id="mainForm">
	
		<p:messages id="messages" showDetail="true" autoUpdate="true" />
	
		<h:outputText value="Upload a new file" style="margin-left:10px;font-weight:bold;color:#19588C"/>

		<br/>

		<p:separator style="margin-left:10px;"/>

		<p:fileUpload value="#{sendBean.file}" mode="simple" auto="true" style="margin-left:10px;" />  

  	    <br/><br/>
  	    
  	    <p:outputPanel  id="outputPanel"/>
  	    
  	    <p:commandButton value="Submit" ajax="false" action="#{sendBean.uploadFileAndData}" style="margin-left:10px;margin-top:10px;margin-bottom:20px;" >
  	    	
  	    </p:commandButton>
  	  
	</h:form>

</h:body>
</html>